<html>
<head><meta charset="utf-8"><title>infinite stack growth in chalk · wg-traits · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/index.html">wg-traits</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html">infinite stack growth in chalk</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="178932108"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/178932108" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#178932108">(Oct 24 2019 at 08:47)</a>:</h4>
<p>I've got <a href="https://github.com/rust-analyzer/rust-analyzer/issues/2052" target="_blank" title="https://github.com/rust-analyzer/rust-analyzer/issues/2052">a bug</a> report today about rust-analyzer using 200 gigabytes of ram (sic!).</p>
<p>I've tried to catch some stack-traces when this happens, and they seem to point at chalk: <a href="https://gist.github.com/matklad/c6320c19b08afc8e6d8ca8612354d5b8" target="_blank" title="https://gist.github.com/matklad/c6320c19b08afc8e6d8ca8612354d5b8">https://gist.github.com/matklad/c6320c19b08afc8e6d8ca8612354d5b8</a></p>



<a name="178932204"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/178932204" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#178932204">(Oct 24 2019 at 08:48)</a>:</h4>
<p>I haven't dived into this yet, but I wonder if anyone with a better chalk understanding can think of a reason for such behavior? cc <span class="user-mention" data-user-id="129457">@Florian Diebold</span></p>



<a name="178932490"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/178932490" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#178932490">(Oct 24 2019 at 08:52)</a>:</h4>
<p>Note that I don't think this is a recent chalk regression: we updated chalk 14 days ago, and the issues seems much fresher. My hypothesis is that we just started to run chalk even more aggresively recently (due to find usages), and it hit some nasty code somewhere. Specifically, I can reproduce this problem if I try to find usages of <code>Iterator::next</code></p>



<a name="178932729"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/178932729" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#178932729">(Oct 24 2019 at 08:56)</a>:</h4>
<p>One interesting bit here is that the stacktrace, if I read it right, looks like basically a tight loop which does stacker allocation. This is strange: I would expect more stuff to happen in between calls to <code>stacker::maybe_grow</code></p>



<a name="178932861"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/178932861" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#178932861">(Oct 24 2019 at 08:58)</a>:</h4>
<p>Looks like the <code>stack_protection</code> feature toggle is on, so somehow the <code>stacker</code> crate doesn't work correctly here</p>



<a name="178933026"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/178933026" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#178933026">(Oct 24 2019 at 09:00)</a>:</h4>
<p>Oh nvm, the 200gb is on the heap, so that's not the issue</p>



<a name="178933076"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/178933076" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#178933076">(Oct 24 2019 at 09:01)</a>:</h4>
<p>I am almost sure it is the stacker allocated stack</p>



<a name="178933201"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/178933201" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#178933201">(Oct 24 2019 at 09:03)</a>:</h4>
<p>Or maybe not? The stacktrace looks like it's basically allocatiing in a tight loop, but maybe not each <code>maybe_grow_stack</code> is an allocation?</p>



<a name="178933305"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/178933305" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#178933305">(Oct 24 2019 at 09:05)</a>:</h4>
<p>Isn't it growing the stack and storing parts of the stack on the heap when it gets too big?</p>



<a name="178933414"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/178933414" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#178933414">(Oct 24 2019 at 09:06)</a>:</h4>
<p>But looking at those 3 line numbers in <code>logic.rs</code>, it seems like it's recursively looking at the same (sub)goal in a loop</p>



<a name="178933898"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/178933898" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#178933898">(Oct 24 2019 at 09:14)</a>:</h4>
<p>It's weird that the issue started in the last 14 days, though. The only relevant change in Chalk seems to be adding support for <code>Ty::Dyn</code>/<code>Ty::Opaque</code>, which rust-analyzer isn't using yet</p>



<a name="178934265"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/178934265" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#178934265">(Oct 24 2019 at 09:20)</a>:</h4>
<p>I think the reason why we are seeing this is that we've started to exercise chalk more, via find usages, which happned yesterday</p>



<a name="178934447"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/178934447" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#178934447">(Oct 24 2019 at 09:23)</a>:</h4>
<p>Ah, <a href="https://github.com/rust-analyzer/rust-analyzer/pull/1892" target="_blank" title="https://github.com/rust-analyzer/rust-analyzer/pull/1892">this one</a></p>



<a name="178936210"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/178936210" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#178936210">(Oct 24 2019 at 09:50)</a>:</h4>
<blockquote>
<p>Ah, <a href="https://github.com/rust-analyzer/rust-analyzer/pull/1892" target="_blank" title="https://github.com/rust-analyzer/rust-analyzer/pull/1892">this one</a></p>
</blockquote>
<p>what are you highlighting here, <span class="user-mention" data-user-id="125131">@detrumi</span> ?</p>



<a name="178936254"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/178936254" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#178936254">(Oct 24 2019 at 09:50)</a>:</h4>
<p>(ps this would be a <em>perfect</em> case where it'd be so cool if we had a facility to dump out chalk-ir into a format we can reproduce)</p>



<a name="178936299"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/178936299" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#178936299">(Oct 24 2019 at 09:51)</a>:</h4>
<p><span class="user-mention" data-user-id="133169">@matklad</span> -- do you have a few more details? like, what are you analyzing?</p>



<a name="178936415"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/178936415" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#178936415">(Oct 24 2019 at 09:53)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> just created a non-minimized reproduction:</p>
<div class="codehilite"><pre><span></span>cargo run --release -p ra_cli -- analysis-stats --with-deps .
</pre></div>



<a name="178936428"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/178936428" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#178936428">(Oct 24 2019 at 09:53)</a>:</h4>
<p>(<code>--with-deps</code> flag was added moments ago)</p>



<a name="178936435"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/178936435" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#178936435">(Oct 24 2019 at 09:53)</a>:</h4>
<p>ok</p>



<a name="178936488"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/178936488" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#178936488">(Oct 24 2019 at 09:54)</a>:</h4>
<p><a href="/user_uploads/4715/dzSxD5gMed5IZ9HlU4ck3Aai/pasted_image.png" target="_blank" title="pasted_image.png">pasted image</a></p>
<div class="message_inline_image"><a href="/user_uploads/4715/dzSxD5gMed5IZ9HlU4ck3Aai/pasted_image.png" target="_blank" title="pasted image"><img src="/user_uploads/4715/dzSxD5gMed5IZ9HlU4ck3Aai/pasted_image.png"></a></div>



<a name="178936501"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/178936501" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#178936501">(Oct 24 2019 at 09:54)</a>:</h4>
<blockquote>
<p>what are you highlighting here, <span class="user-mention silent" data-user-id="125131">detrumi</span> ?</p>
</blockquote>
<p>Just the 'find usages' PR that <span class="user-mention" data-user-id="133169">@matklad</span> was talking about, I didn't highlight any code</p>



<a name="178936513"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/178936513" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#178936513">(Oct 24 2019 at 09:54)</a>:</h4>
<p>It says <code>try_reduce_with</code> is a problem, it should be somewhere almong stdlib or analyzer's deps</p>



<a name="178936623"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/178936623" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#178936623">(Oct 24 2019 at 09:56)</a>:</h4>
<p>So, it's try_reduce_with from rayon</p>



<a name="178936659"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/178936659" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#178936659">(Oct 24 2019 at 09:56)</a>:</h4>
<p><a href="https://github.com/rayon-rs/rayon/blob/fc69e50f298b2f5fa2ce9be27827a0850f3bc8f2/src/iter/try_reduce_with.rs#L7-L19" target="_blank" title="https://github.com/rayon-rs/rayon/blob/fc69e50f298b2f5fa2ce9be27827a0850f3bc8f2/src/iter/try_reduce_with.rs#L7-L19">https://github.com/rayon-rs/rayon/blob/fc69e50f298b2f5fa2ce9be27827a0850f3bc8f2/src/iter/try_reduce_with.rs#L7-L19</a></p>



<a name="178936722"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/178936722" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#178936722">(Oct 24 2019 at 09:57)</a>:</h4>
<p>hmm</p>



<a name="178936840"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/178936840" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#178936840">(Oct 24 2019 at 09:58)</a>:</h4>
<p>I have to run now to get breakfast etc ready for the day, but I guess the obvious thing to do is to try and make a minmal test case from </p>
<div class="codehilite"><pre><span></span><span class="w">    </span><span class="k">fn</span> <span class="nf">try_reduce_with</span><span class="o">&lt;</span><span class="n">T</span><span class="p">,</span><span class="w"> </span><span class="n">OP</span><span class="o">&gt;</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="n">op</span>: <span class="nc">OP</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nb">Option</span><span class="o">&lt;</span><span class="n">Self</span>::<span class="n">Item</span><span class="o">&gt;</span><span class="w"></span>
<span class="w">    </span><span class="k">where</span><span class="w"></span>
<span class="w">        </span><span class="n">OP</span>: <span class="nb">Fn</span><span class="p">(</span><span class="n">T</span><span class="p">,</span><span class="w"> </span><span class="n">T</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">Self</span>::<span class="n">Item</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="nb">Sync</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="nb">Send</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="n">Self</span>::<span class="n">Item</span>: <span class="nc">Try</span><span class="o">&lt;</span><span class="nb">Ok</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">T</span><span class="o">&gt;</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="n">try_reduce_with</span>::<span class="n">try_reduce_with</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="n">op</span><span class="p">)</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
</pre></div>


<p>I'm wondering if it's something to do with the <code>Self::Item</code> normalization stuff</p>



<a name="178936860"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/178936860" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#178936860">(Oct 24 2019 at 09:59)</a>:</h4>
<p>er, sorry, wrong <code>try_reduce_with</code> I guess?</p>



<a name="178936879"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/178936879" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#178936879">(Oct 24 2019 at 09:59)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="k">pub</span><span class="p">(</span><span class="k">super</span><span class="p">)</span><span class="w"> </span><span class="k">fn</span> <span class="nf">try_reduce_with</span><span class="o">&lt;</span><span class="n">PI</span><span class="p">,</span><span class="w"> </span><span class="n">R</span><span class="p">,</span><span class="w"> </span><span class="n">T</span><span class="o">&gt;</span><span class="p">(</span><span class="n">pi</span>: <span class="nc">PI</span><span class="p">,</span><span class="w"> </span><span class="n">reduce_op</span>: <span class="nc">R</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nb">Option</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="w"></span>
<span class="k">where</span><span class="w"></span>
<span class="w">    </span><span class="n">PI</span>: <span class="nc">ParallelIterator</span><span class="o">&lt;</span><span class="n">Item</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">T</span><span class="o">&gt;</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="n">R</span>: <span class="nb">Fn</span><span class="p">(</span><span class="n">T</span>::<span class="nb">Ok</span><span class="p">,</span><span class="w"> </span><span class="n">T</span>::<span class="nb">Ok</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">T</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="nb">Sync</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="n">T</span>: <span class="nc">Try</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="nb">Send</span><span class="p">,</span><span class="w"></span>
<span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="kd">let</span><span class="w"> </span><span class="n">full</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">AtomicBool</span>::<span class="n">new</span><span class="p">(</span><span class="kc">false</span><span class="p">);</span><span class="w"></span>
<span class="w">    </span><span class="kd">let</span><span class="w"> </span><span class="n">consumer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">TryReduceWithConsumer</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="n">reduce_op</span>: <span class="kp">&amp;</span><span class="nc">reduce_op</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="n">full</span>: <span class="kp">&amp;</span><span class="nc">full</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="p">};</span><span class="w"></span>
<span class="w">    </span><span class="n">pi</span><span class="p">.</span><span class="n">drive_unindexed</span><span class="p">(</span><span class="n">consumer</span><span class="p">)</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>



<a name="178936910"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/178936910" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#178936910">(Oct 24 2019 at 09:59)</a>:</h4>
<p>Are more minimal reproduction is </p>
<div class="codehilite"><pre><span></span>cargo run --release -p ra_cli -- analysis-stats --only &quot;try_reduce_with&quot; ~/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-1.2.0
</pre></div>



<a name="178937022"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/178937022" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#178937022">(Oct 24 2019 at 10:01)</a>:</h4>
<p><span class="user-mention" data-user-id="133169">@matklad</span> there's an <code>analysis-stats</code> missing there, right</p>



<a name="178937036"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/178937036" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#178937036">(Oct 24 2019 at 10:01)</a>:</h4>
<p>yup, fixed</p>



<a name="178937170"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/178937170" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#178937170">(Oct 24 2019 at 10:03)</a>:</h4>
<p>I must say, I love how useful <code>analysis_stats</code> is for pin-pointing an offending function: we didn't have quite as good infra in IntelliJ Rust</p>



<a name="178944497"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/178944497" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#178944497">(Oct 24 2019 at 12:02)</a>:</h4>
<p>minimized example: <a href="https://gist.github.com/matklad/612f7c6142e0b27030711e6047cb55fc" target="_blank" title="https://gist.github.com/matklad/612f7c6142e0b27030711e6047cb55fc">https://gist.github.com/matklad/612f7c6142e0b27030711e6047cb55fc</a> to a single file</p>



<a name="178944516"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/178944516" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#178944516">(Oct 24 2019 at 12:02)</a>:</h4>
<p>it doesn't compile for various reasons, but still throws chalk into an allocating loop</p>



<a name="178945263"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/178945263" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#178945263">(Oct 24 2019 at 12:14)</a>:</h4>
<p>So, the repro looks strange:</p>
<ul>
<li>it doesn't define any impls, only traits</li>
<li>It needs std to actually work, if I disable sysroot loading, it is analysed instantly</li>
</ul>



<a name="178945948"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/178945948" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#178945948">(Oct 24 2019 at 12:24)</a>:</h4>
<p><span aria-label="tada" class="emoji emoji-1f389" role="img" title="tada">:tada:</span> , minimized to a rust-analyzer unit-test: <a href="https://github.com/matklad/rust-analyzer/commit/d907b00f440ca0a127e6975994a54391ce5a976d" target="_blank" title="https://github.com/matklad/rust-analyzer/commit/d907b00f440ca0a127e6975994a54391ce5a976d">https://github.com/matklad/rust-analyzer/commit/d907b00f440ca0a127e6975994a54391ce5a976d</a></p>



<a name="178946165"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/178946165" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#178946165">(Oct 24 2019 at 12:27)</a>:</h4>
<p><span class="user-mention" data-user-id="129457">@Florian Diebold</span> would you like to look at it closer at some point? I feel you'll be much more effective than me there. On the rust-analyzer side, I've fixed the semi-unrelated bug in find-usages which was the primary trigger for this issue, so it's not urgent anymore</p>



<a name="178946412"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/178946412" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#178946412">(Oct 24 2019 at 12:30)</a>:</h4>
<p>I wonder if we should spend some time building a c-reduce-like infra, which can go from <code>analysis-stats --with-deps .</code> to a single-small-file test automatically?</p>



<a name="178947815"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/178947815" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#178947815">(Oct 24 2019 at 12:48)</a>:</h4>
<blockquote>
<p><span class="user-mention silent" data-user-id="129457">Florian Diebold</span> would you like to look at it closer at some point?</p>
</blockquote>
<p>sure, I can probably take a look on the weekend</p>



<a name="178948766"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/178948766" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#178948766">(Oct 24 2019 at 12:59)</a>:</h4>
<p>(the first thing to check here would be the logs from <code>CHALK_DEBUG=1</code>, btw)</p>



<a name="178948862"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/178948862" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#178948862">(Oct 24 2019 at 13:00)</a>:</h4>
<p>I'm going to try to run the unit test</p>



<a name="178949430"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/178949430" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#178949430">(Oct 24 2019 at 13:06)</a>:</h4>
<p>definitely <em>related</em> to associated types</p>



<a name="178949445"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/178949445" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#178949445">(Oct 24 2019 at 13:06)</a>:</h4>
<p><span class="user-mention" data-user-id="129457">@Florian Diebold</span> I see a number of things like</p>
<div class="codehilite"><pre><span></span>ProjectionEq((TypeId(2))&lt;!0_1, StructId(0)&lt;(TypeId(0))&lt;!0_2&gt;, (TypeId(0))&lt;!0_2&gt;&gt;&gt; = !0_18446744073709551615)
</pre></div>


<p>are those gigantic indices normal for rust-analyzer?</p>



<a name="178949453"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/178949453" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#178949453">(Oct 24 2019 at 13:06)</a>:</h4>
<p>I'm referring to <code>!0_18446744073709551615</code></p>



<a name="178949509"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/178949509" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#178949509">(Oct 24 2019 at 13:07)</a>:</h4>
<p>I'm guessing that is some kind of internal id</p>



<a name="178949651"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/178949651" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#178949651">(Oct 24 2019 at 13:09)</a>:</h4>
<p>something else I see:</p>
<p>It seems like we're seeing duplicate program clauses, leading us to have duplicate strands. Kind of wasteful. </p>
<p>Example:</p>
<div class="codehilite"><pre><span></span>     62:: | program clause = for&lt;type&gt; Implemented(^0: TraitId(1)) :- Compatible, DownstreamType(^0), ¯\_(ツ)_/¯
     95:: | program clause = for&lt;type&gt; Implemented(^0: TraitId(1)) :- FromEnv(^0 as TraitId(1))
    116:: | program clause = for&lt;type&gt; Implemented(^0: TraitId(1)) :- Compatible, DownstreamType(^0), ¯\_(ツ)_/¯
    149:: | program clause = for&lt;type&gt; Implemented(^0: TraitId(1)) :- FromEnv(^0 as TraitId(1))
</pre></div>



<a name="178949655"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/178949655" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#178949655">(Oct 24 2019 at 13:09)</a>:</h4>
<p>not sure what gives rise to that</p>



<a name="178950182"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/178950182" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#178950182">(Oct 24 2019 at 13:16)</a>:</h4>
<blockquote>
<p>I'm referring to <code>!0_18446744073709551615</code></p>
</blockquote>
<p>yeah, that's our representative for "Unknown" <span aria-label="neutral" class="emoji emoji-1f610" role="img" title="neutral">:neutral:</span></p>



<a name="178950217"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/178950217" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#178950217">(Oct 24 2019 at 13:17)</a>:</h4>
<p>we use a placeholder type with max index for that currently</p>



<a name="178950244"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/178950244" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#178950244">(Oct 24 2019 at 13:17)</a>:</h4>
<p>maybe you have a better idea how to represent that? ideally of course, we'd like to have an <code>Error</code> type on Chalk side</p>



<a name="178950267"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/178950267" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#178950267">(Oct 24 2019 at 13:17)</a>:</h4>
<blockquote>
<p>maybe you have a better idea how to represent that? ideally of course, we'd like to have an <code>Error</code> type on Chalk side</p>
</blockquote>
<p>yeah maybe we should just add that</p>



<a name="178950593"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/178950593" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#178950593">(Oct 24 2019 at 13:21)</a>:</h4>
<p>OK, I think I know what the problem is</p>



<a name="178950612"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/178950612" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#178950612">(Oct 24 2019 at 13:21)</a>:</h4>
<p>let me see if I can make a minimized repro for now</p>



<a name="178952525"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/178952525" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#178952525">(Oct 24 2019 at 13:43)</a>:</h4>
<blockquote>
<p>yeah maybe we should just add that</p>
</blockquote>
<p>I could try doing that, if we are agreed that it should be added <span aria-label="slight smile" class="emoji emoji-1f642" role="img" title="slight smile">:slight_smile:</span></p>



<a name="178952648"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/178952648" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#178952648">(Oct 24 2019 at 13:44)</a>:</h4>
<p>(distracted, but I think it has something to do with processing of answers causing new projection-eq subgoals)</p>



<a name="178952654"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/178952654" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#178952654">(Oct 24 2019 at 13:44)</a>:</h4>
<p>I thought we avoided doing that, but something's going wrong</p>



<a name="178952674"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/178952674" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#178952674">(Oct 24 2019 at 13:44)</a>:</h4>
<blockquote>
<p>I could try doing that, if we are agreed that it should be added <span aria-label="slight smile" class="emoji emoji-1f642" role="img" title="slight smile">:slight_smile:</span></p>
</blockquote>
<p>I think it makes sense, yeah</p>



<a name="179333999"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/179333999" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#179333999">(Oct 29 2019 at 14:31)</a>:</h4>
<p>I looked a bit more into this test this morning</p>



<a name="179334010"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/179334010" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#179334010">(Oct 29 2019 at 14:31)</a>:</h4>
<p>I haven't yet produced the "chalk example" that I want to</p>



<a name="179334067"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/179334067" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#179334067">(Oct 29 2019 at 14:31)</a>:</h4>
<p>but if you change <code>try_reduce_with</code> to</p>
<div class="codehilite"><pre><span></span><span class="k">fn</span> <span class="nf">try_reduce_with</span><span class="o">&lt;</span><span class="n">PI</span><span class="p">,</span><span class="w"> </span><span class="n">R</span><span class="p">,</span><span class="w"> </span><span class="n">T</span><span class="o">&gt;</span><span class="p">(</span><span class="n">pi</span>: <span class="nc">PI</span><span class="p">,</span><span class="w"> </span><span class="n">reduce_op</span>: <span class="nc">R</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nb">Option</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="w"></span>
<span class="k">where</span><span class="w"></span>
<span class="w">    </span><span class="n">PI</span>: <span class="nc">ParallelIterator</span><span class="o">&lt;</span><span class="n">Item</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">T</span><span class="o">&gt;</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="n">R</span>: <span class="nb">FnOnce</span><span class="p">(</span><span class="n">T</span>::<span class="nb">Ok</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">T</span><span class="p">,</span><span class="w"> </span><span class="c1">// &lt;-- changed this line from FnOnce(T::Ok, T::Ok)</span>
<span class="w">    </span><span class="n">T</span>: <span class="nc">Try</span><span class="p">,</span><span class="w"></span>
<span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="n">pi</span><span class="p">.</span><span class="n">drive_unindexed</span><span class="p">()</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>


<p>it seems like everything works more like I expect</p>



<a name="179334130"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/179334130" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#179334130">(Oct 29 2019 at 14:32)</a>:</h4>
<p>I think the next obvious step would be to put a bit of energy into making the standalone chalk test, which shouldn't be that hard</p>



<a name="179334235"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/179334235" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#179334235">(Oct 29 2019 at 14:33)</a>:</h4>
<p>although some of the things that rust-analyzer are doing</p>



<a name="179334244"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/179334244" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#179334244">(Oct 29 2019 at 14:33)</a>:</h4>
<p>are not <em>trivial</em> for us to do in a test</p>



<a name="179334254"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/179334254" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#179334254">(Oct 29 2019 at 14:33)</a>:</h4>
<p>and may or may not play an important role</p>



<a name="179334324"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/179334324" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#179334324">(Oct 29 2019 at 14:34)</a>:</h4>
<p>in particular rust-analyzer is inserting "normalized" associated types into the environment (for <code>T::Ok</code>), which I don't think chalk's testing infrastructure alows us to do right now</p>



<a name="179334332"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/179334332" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#179334332">(Oct 29 2019 at 14:34)</a>:</h4>
<p>maybe worth making a syntax for that</p>



<a name="179335508"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/179335508" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#179335508">(Oct 29 2019 at 14:44)</a>:</h4>
<p>it may be key; my naive attempt to recreate the problem failed -- <a href="https://github.com/nikomatsakis/chalk-ndm/blob/rust-anayzer-infinite-growth/src/test/projection.rs#L680" target="_blank" title="https://github.com/nikomatsakis/chalk-ndm/blob/rust-anayzer-infinite-growth/src/test/projection.rs#L680">this test passes</a></p>



<a name="180276073"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/180276073" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#180276073">(Nov 08 2019 at 21:51)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> let's create an inssue on the chalk repo about this, lest it slips through the cracks. I can do that if you like.</p>



<a name="180276099"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/180276099" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#180276099">(Nov 08 2019 at 21:51)</a>:</h4>
<p><span class="user-mention" data-user-id="133169">@matklad</span> thanks. I had indeed forgotten about it</p>



<a name="180276108"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/180276108" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#180276108">(Nov 08 2019 at 21:51)</a>:</h4>
<p>I remember being close to understanding the problem at     some point</p>



<a name="180276126"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/180276126" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#180276126">(Nov 08 2019 at 21:51)</a>:</h4>
<p>I'll have to look back in the history...</p>



<a name="180305947"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/180305947" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#180305947">(Nov 09 2019 at 10:01)</a>:</h4>
<p>filed <a href="https://github.com/rust-lang/chalk/issues/280" target="_blank" title="https://github.com/rust-lang/chalk/issues/280">https://github.com/rust-lang/chalk/issues/280</a></p>



<a name="180313089"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/180313089" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#180313089">(Nov 09 2019 at 13:25)</a>:</h4>
<p>(deleted)</p>



<a name="180313093"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/180313093" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#180313093">(Nov 09 2019 at 13:25)</a>:</h4>
<p>(deleted)</p>



<a name="180313113"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/180313113" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#180313113">(Nov 09 2019 at 13:25)</a>:</h4>
<p>Whoops wrong thread</p>



<a name="180456671"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/180456671" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#180456671">(Nov 11 2019 at 20:21)</a>:</h4>
<p><span class="user-mention" data-user-id="133169">@matklad</span> or <span class="user-mention" data-user-id="129457">@Florian Diebold</span> : remind me how I redirect to use chalk from a local directory?</p>



<a name="180456947"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/180456947" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#180456947">(Nov 11 2019 at 20:24)</a>:</h4>
<p>There’s commented out patch section in the root cargo.toml</p>



<a name="180457036"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/180457036" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#180457036">(Nov 11 2019 at 20:26)</a>:</h4>
<p>Smth like this should work: <a href="https://github.com/rust-analyzer/rust-analyzer/commit/54f77ad68dc47ca8d99a12f1467bebe8e5441d7e#diff-80398c5faae3c069e4e6aa2ed11b28c0" target="_blank" title="https://github.com/rust-analyzer/rust-analyzer/commit/54f77ad68dc47ca8d99a12f1467bebe8e5441d7e#diff-80398c5faae3c069e4e6aa2ed11b28c0">https://github.com/rust-analyzer/rust-analyzer/commit/54f77ad68dc47ca8d99a12f1467bebe8e5441d7e#diff-80398c5faae3c069e4e6aa2ed11b28c0</a></p>



<a name="180457046"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/180457046" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#180457046">(Nov 11 2019 at 20:26)</a>:</h4>
<p>(We should just keep commended out salsa and chalk replacements there I think)</p>



<a name="180458661"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/180458661" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#180458661">(Nov 11 2019 at 20:48)</a>:</h4>
<p>OK, so the another relevant factor is that rust-analyzer sets the max-size to 4</p>



<a name="180458666"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/180458666" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#180458666">(Nov 11 2019 at 20:48)</a>:</h4>
<p>I still haven't reproduced this, but if I se the max-size to 10, it goes away</p>



<a name="180460077"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/180460077" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#180460077">(Nov 11 2019 at 21:09)</a>:</h4>
<p>ok, I reproduced the problem <span aria-label="tada" class="emoji emoji-1f389" role="img" title="tada">:tada:</span></p>



<a name="180465293"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/180465293" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#180465293">(Nov 11 2019 at 22:21)</a>:</h4>
<blockquote>
<p>OK, so the another relevant factor is that rust-analyzer sets the max-size to 4</p>
</blockquote>
<p>I set that so low because of the performance problems, it might not be necessary anymore with floundering</p>



<a name="180469334"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/180469334" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#180469334">(Nov 11 2019 at 23:39)</a>:</h4>
<p><span class="user-mention" data-user-id="129457">@Florian Diebold</span> well it caught a useful edge case :)</p>



<a name="181119639"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/181119639" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#181119639">(Nov 19 2019 at 15:08)</a>:</h4>
<p>We continue to get bug reports which I think bottom out in this issue</p>



<a name="181119661"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/181119661" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#181119661">(Nov 19 2019 at 15:08)</a>:</h4>
<p>(as in, this seems like a nice bug to fix :) )</p>



<a name="181138842"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/181138842" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#181138842">(Nov 19 2019 at 18:15)</a>:</h4>
<p>/me hits this while hacking on rust-analyzer itself :)</p>



<a name="181672757"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/181672757" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#181672757">(Nov 22 2019 at 20:08)</a>:</h4>
<p>I have a fix for this here: <a href="https://github.com/rust-lang/chalk/pull/294" target="_blank" title="https://github.com/rust-lang/chalk/pull/294">https://github.com/rust-lang/chalk/pull/294</a></p>



<a name="181672762"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/181672762" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#181672762">(Nov 22 2019 at 20:08)</a>:</h4>
<p>However, it might not be the <em>most correct</em> fix</p>



<a name="181673735"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/181673735" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#181673735">(Nov 22 2019 at 20:20)</a>:</h4>
<p>hmm</p>



<a name="181673741"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/181673741" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#181673741">(Nov 22 2019 at 20:20)</a>:</h4>
<p>I had a fix in a branch too</p>



<a name="181673744"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/181673744" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#181673744">(Nov 22 2019 at 20:21)</a>:</h4>
<p>I guess I forgot to open it?</p>



<a name="181673768"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/181673768" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#181673768">(Nov 22 2019 at 20:21)</a>:</h4>
<p>well I was basically changing how unification works</p>



<a name="181673781"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/181673781" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#181673781">(Nov 22 2019 at 20:21)</a>:</h4>
<p>to let an inference variable get unified with a projection</p>



<a name="181673827"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/181673827" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#181673827">(Nov 22 2019 at 20:22)</a>:</h4>
<p>that said, I think <span class="user-mention" data-user-id="232957">@Jack Huey</span>'s PR is probbaly also ok, and I think it will fix the issue as well, sinceI think this scenario can only arise from the environment</p>



<a name="181691185"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/infinite%20stack%20growth%20in%20chalk/near/181691185" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/infinite.20stack.20growth.20in.20chalk.html#181691185">(Nov 23 2019 at 00:41)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> I would still be interested to see your fix. I'm wondering if it would have any effect on <a href="https://github.com/rust-lang/rust/issues/111" target="_blank" title="https://github.com/rust-lang/rust/issues/111">#111</a> or <a href="https://github.com/rust-lang/rust/issues/234" target="_blank" title="https://github.com/rust-lang/rust/issues/234">#234</a></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>